Create an Cloned Image of Your Raspberry Pi

External Drive

You'll want an external thumb drive or NAS by Mounting a Drive that has twice or more storage than your Raspberry Pi's SD Card capacity

Here I've mounted the Network Mount to network_mount inside my user folder so I don't have to deal with funky permissions

sudo dd if=/dev/mmcblk0 of=/home/USERNAME/network_mount/pibackup/pi4-24_March_05.img bs=1M

Shrink and Zip

Grab this easy to use library

wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
sudo chmod +x pishrink.sh
sudo mv pishrink.sh /usr/local/bin
cd /home/USERNAME/network_mount/pibackup
sudo pishrink.sh -z pi4-24_March_05.img

Credit